package grape.workflow.rest.flowable.ext;

import cn.hutool.core.util.StrUtil;
import org.flowable.task.api.Task;
import org.flowable.ui.task.service.runtime.FlowableTaskActionService;
import org.springframework.stereotype.Service;

/**
 * Created by yangwei
 * Created at 2020/6/23 13:43
 */
@Service
public class CustomeFlowableTaskActionService extends FlowableTaskActionService {

    @Override
    protected void addIdentiyLinkForUser(Task task, String userId, String linkType) {
        // 在无法认领任务中，原始的任务并没有分配用户，会出现空指针，这里重写一下
        if(!StrUtil.isEmpty(userId)){
            super.addIdentiyLinkForUser(task, userId, linkType);

        }
    }
}
